#ifndef __PROTECTED_Q__
#define __PROTECTED_Q__

#include <queue>
#include <stdlib.h>
#include <pthread.h>

#include "Message.h"
class ProtectedQ{
private:


protected:
	queue<Message*> inbox;
	 //mutex for message queue
	pthread_mutex_t	queue_lock;
public:
    ProtectedQ();
    virtual ~ProtectedQ();
    virtual void push(Message* msg);
    virtual Message * pop();
    int size();
    void clear();


};
#endif
